<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common/includes.jsp" %>

<html>

 <head>
    
    <title>用户菜单管理</title>
    <!-- import css and js -->
	<%@ include file="/common/meta.jsp" %>
	
	<script src="${ctx}/js/jsp/comm.js" type="text/javascript"></script>
	<script type="text/javascript">
		var basic_Url = "${ctx}/security/rolemenuplace";
		var basic_WUrl = "security/rolemenuplace";
		var basic_Title="用户菜单管理";
		var show_Width=1000;
		var show_Hight=500;
		$(function(){
			var grid = $("#table1").ligerGrid({
				columns: [
		                  { display: '登录名', name: 'name', align: 'left', width: 120 },
		                  { display: '姓名', name: 'realname', width: 220, align: 'left' },
		                  { display: '创建时间', name: 'createdate', width: 220, align: 'left',
		                	  render: function (item){
		                		  var cdate=new Date(item.createdate);
		                		  return formatDate(cdate,"yyyy-MM-dd HH:mm:ss")
		                	  } 
		                  },
		                  { display: '状态', name: 'enabled', width: 170, align: 'left' ,
		                	  render: function (item){
			                      if (parseInt(item.enabled) == 0) {
			                    	  return '冻结';
			                      }else if (parseInt(item.enabled) == 1) {
			                    	  return '激活';
			                      }
			                      return item.enabled;
		                      } },
		                      { display: '', name: 'id', width: 170, align: 'left' ,
		                    	  render: function (item){
		    	                        return "<a href='javascript:addrp(" + item.id + ")'>菜单分配</a> "; 
		                          } }
		                      ],  usePager: true,pageSize:30,
		                      url : sys_context+"/security/user/list.do",
		                      width: '100%', height: '98%', checkbox: true,rownumbers:true
		                  });
			$("#pageloading").hide();
		});
		
		function addrp(userid){
			var url = basic_WUrl+"/operation/add/"+userid+".do?userid="+userid;
			ShowIframeDialog("operate",basic_Title,url,show_Width,show_Hight);
		}
	</script>
  </head>
<body>
 <div id="layout1">
       <div position="center" id="table1">
      </div>
      <div class="clear"></div>
      </div> 
    
</body>
</html>